<template>
	<view class="my-content">
		<view class="search-box">
			<SearchTab @search="search" :tabTwoName="null"></SearchTab>
		</view>
		<view class="title u-flex u-margin-bottom-20 u-margin-top-20">
			<view>
				<image :src='serverImageUrl("/static/images/teleSales/titleIcon2.png")'>
				</image>
				{{$t("猜你喜欢")}}
			</view>
		</view>

		<ListBySearchResult :showAddBfBtn="true" :list="resultList" @addVisit="addVisit">
		</ListBySearchResult>

	</view>
</template>

<script>
	import SearchTab from '@/components/SearchEnterpriseTab.vue'
	import ListBySearchResult from '../components/ListBySearchResult.vue'
	export default {
		components: {
			SearchTab,
			ListBySearchResult
		},
		onLoad({
			id
		}) {
			this.id = id
		},
		data() {
			return {
				id: null,
				resultList: [{
					name: '3',
					checked: false
				}, {
					name: '3',
					checked: false
				}, {
					name: '3',
					checked: false
				}, {
					name: '3',
					checked: false
				}],
			};
		},
		methods: {
			//从猜你喜欢的列表中添加拜访
			addVisit(item) {
				console.log(item);
			},
			search(e) {
				console.log(e);
				this.$u.route({
					url: 'pages/teleSales/searchResult/searchResult',
					params: {
						...e,
						id: this.id
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.my-content {
		background-color: #f6f6f6;
		height: auto;
		min-height: 100%;
		padding: 20rpx 30rpx;

		.title {
			font-size: 32rpx;
			line-height: 50rpx;
			font-weight: 800;
			justify-content: space-between;

			.more {
				color: #999;
				font-size: 24rpx;
				font-weight: normal;
			}

			image {
				width: 40rpx;
				height: 40rpx;
				vertical-align: middle;
				margin-right: 15rpx;
				transform: translateY(-2px);
			}
		}
	}
</style>